package com.findbus.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.findbus.project.R;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;


public class WebActivity extends FragmentActivity {
	@ViewInject(R.id.a_web_web)
	private WebView web;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_web);
		initView();
	}

	private void initView() {
		// TODO Auto-generated method stub
		ViewUtils.inject(this);
		web.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
		web.setWebViewClient(new WebViewClient());
		web.setWebChromeClient(new WebChromeClient());
		web.loadUrl( "file:///android_asset/UserProtocol.html"/*, "text/html", "utf-8", null*/);
	}
}
